package com.haisen.core.utils;


import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 正则表达式功能类
 */
public class RegexUtil {


    /**
     * 判断字符串是否为数字
      * @param str
     * @return
     */
    public static boolean  isNumber(String str){
           String regRule = "[0-9]*";
          Pattern pattern = Pattern.compile(regRule);
          Matcher match = pattern.matcher(str);
        return match.matches();
      }
}
